<style>
.fui-goods-item .image .playbtn {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
	padding-top:3rem;
    text-align: center;
    color: #fff;
}
.fui-goods-group.block .fui-goods-item .detail {height:auto}
.fui-goods-group.block .fui-goods-item .detail.commission_money {height:auto}
</style>
	<div ng-if="pagedata.goodslist" class="fui-goods-group block" style="padding: 0.3rem;padding-top:0">
			<div ng-repeat="item in pagedata.goodslist" class="fui-goods-item">
				<div ng-click="pagedata.gotoitem(item);" ng-class="{'image':1, 'echelon':item.active.title}" data-text="{{item.active.title}}" style="position:relative;background-image: url({{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}})">
						<div ng-show="item.total <=0" class="salez" style="background-image: url({{tomedia(pagedata.shopset.saleout) || '../addons/jy_weishop/resource/images/salez.png'}});"></div>
						<div ng-if="item.video" class="playbtn"><i class="icon icon-iconfontplay2" style="font-size:1.6rem;"></i></div>
				</div>
				<div class="detail" ng-class="{'detail':1,'commission_money':item.commission_title}">
					<div ng-click="pagedata.gotoitem(item);" class="name">
							<i ng-show="item.ispresell == 1" class="fui-tag fui-tag-danger">预售</i>
							<span ng-show="item.ispresell != 1" class="fui-tag fui-tag-danger" style="background:linear-gradient(to right,rgba(244,221,187,0.6),rgba(235,216,174,1));color:#512f0a;width:auto;font-weight:400">{{item.merchid>0?'商户':'直营'}}</span>
							{{item.title}}
					</div>
					<div ng-if="pagedata.shopset.vip_price!=1" class="price">
						<span class="text">￥{{item.active.price || item.price}}</span>
						<span href="javascript:" ng-click="pagedata.gotopicker(item);" class="syscolorred"><i class="icon icon-tianmaochaoshigouwuche"></i></span>
					</div>
					<div ng-if="pagedata.shopset.vip_price==1" class="price" style="font-weight: 400;font-size:0.65rem">
						<span class="text">￥{{item.oldprice ||''}}</span>
						<span class="text"><span style="font-size:0.5rem">会员价</span>￥{{item.active.price || item.price}}</span>
					</div>
					<div ng-if="item.isshowsales!=1" style="margin-top:-0.15rem">
						<span class="subtitle" style="font-weight:400;font-size:0.6rem">已售{{item.salenum || 0}}{{item.unit || '件'}}</span>
					</div>
					<div ng-if="(item.commission_title || pagedata.feemoney.isopen==1)" class="goods-tag" style="font-size:0.5rem;">
						<div ng-if="pagedata.feemoney.isopen==1" class="fui-tag fui-tag-danger fee-tag-zi" style="font-size:0.5rem;margin-right:0.15rem">{{pagedata.feemoney.tag ||'节省'}}￥{{item.feemoney || '0.00'}}</div>
						<div ng-if="item.commission_title" class="fui-tag fui-tag-danger fee-tag" style="font-size:0.5rem;">{{item.commission_title}}￥{{item.commission_money}}</div>
					</div>
				</div>
			</div>
	</div>
<div id="showtaobaoke"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog" style="width:80%;left:10%;">
			<div class="wap-qrcode-container" style="border-radius:0.5rem;height:auto">
				<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
				<p class="example1" style="padding:0.3rem;border-radius:0.5rem;margin:1rem;background:#FFFFCC">{{pagedata.copyinfo}}</p>
				<p ng-click="clip(pagedata.copyinfo)" class="example1 btn btn-sm btn-red-o">复制商品口令</p>
			</div>
		</div>
</div>
<div ng-include="sys_html('goods/_subpicker','','','jy_weishop')"></div>
<script>
scope.pagedata.get_list=function(isfirst){
		var url="jy_weishop/goods.index/getlist/"
		if(!scope.pagedata.params){
			scope.pagedata.params={};
		}
		if(isfirst){
			scope.pagedata.params.page=1;
			scope.pagedata.params.gpage=1;
			scope.pagedata.goodslist=[];
			scope.pagedata.loaded=false;
		}else if(scope.pagedata.loaded || scope.pagedata.loading){
			return;
		}
		if(!isfirst){
			scope.pagedata.params.page=scope.pagedata.params.gpage;
		}
		scope.pagedata.loading=true;
		$('#loading_show').show();
		if(typeof(url)!='object'){
			url=scope.tool.links(url);
		}
		var query=scope.made_query(scope.pagedata.params);
		if(url.query){
			url.query+='&'+query;
		}else{
			url.query=query;
		}
		//console.log('query');console.log(query);
		scope.get(url,function(res){
			//console.log(res);
			scope.pagedata.loading=false;
			$('#loading_show').hide();
			if(!scope.pagedata.goodslist || isfirst){
				scope.pagedata.goodslist=[];
			}
			if(res=='none'){
				scope.pagedata.loaded=true;
				return;
			}
			if(!Array.isArray(res)){
				var goodslist=res.list?res.list:[]
			}else{
				var goodslist=res
			}
			if(goodslist.length==0 || (scope.pagedata.psize && goodslist.length<scope.pagedata.psize)){
				scope.pagedata.loaded=true;
			}
			if(goodslist && goodslist != 'null' && goodslist != 'undefined'){
				for(let key in goodslist){
					scope.pagedata.goodslist.push(goodslist[key]);
				}
			}
			if(scope.pagedata.params){
				scope.pagedata.params.gpage++;
			}
		});
}
scope.pagedata.get_list(1);
scope.pagedata.scroll_bottom=function(){
	scope.pagedata.get_list();
}
</script>
